<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib prefix="aa" uri="http://ajaxanywhere.sourceforge.net/" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><fmt:message key="passengerInfoList.title"/></title> 
<script src="<c:url value='/scripts/common.js'/>"></script> 
<script src="<c:url value='/scripts/ajax/aa.js'/>"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link rel="stylesheet" type="text/css" media="all"	href="<c:url value='/styles/layout.css'/>" />
</head>

<body leftmargin="0" topmargin="0">
<html:form action="passengerInfo">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td class="home-content-title"><img src="images/home_ico_listTitle.gif" width="22" height="20" align="absmiddle" >旅客信息管理</td>
  </tr>
 


   <tr> 
    <td valign="top"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="home-table-topline"> </td>   
        </tr>             
        <tr>       
       <td class="home-table-leftline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr> 
             <html:cancel styleClass="home-inputBtn" property="method.cancel">返回
			</html:cancel>
              </tr>
              
              <tr>
                <td align="center" valign="top">&nbsp;</td>
              </tr>  
       
           <tr> 
          <td valign="top" class="home-edittable-space"> 
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td>
                      <table width="100%" border="0" cellpadding="4" cellspacing="1" class="home-subtable-bgcolor">
                           <html:hidden property="cabinClass"/>
                           <html:hidden property="direct"/>
                          <tr> 
                            <td width="20%" class="home-subtable-view-tdstyle-right">航班号：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightInfo.flightNum}"/></td>
                            <td width="20%" class="home-subtable-view-tdstyle-right">起飞日期：</td>
                            <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightInfo.flightDate}" pattern="yyyy-MM-dd"/></td>
                          </tr>
                            <tr> 
                            <td width="20%" class="home-subtable-view-tdstyle-right">预计起飞时间：</td>
                            <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightInfo.etd}" pattern="HH:mm"/></td>
                            <td width="20%" class="home-subtable-view-tdstyle-right">实际起飞时间：</td>
                            <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightInfo.atd}" pattern="HH:mm"/></td>
                          </tr> 
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">始发站：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightInfo.depaName}"/></td>
                            <td class="home-subtable-view-tdstyle-right">终点站：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightInfo.arrName}"/></td>
                          </tr>
                        </table></td>
                    </tr>
                <tr> 
                  <td>&nbsp;</td>
              </tr>   
              <tr> 
				<td valign="top" class="home-tab-line"> 
				<table width="100%" border="0" cellpadding="2" cellspacing="0" class="list_bordercolor">
                 
                 <tr> 
                    <td colspan="7" class="home-table-tool-content02"><sasis:page items="${passengerInfoList}"/></td>
                 </tr>         
                  <tr> 
                      <td  width="15%" class="home-list-title">&nbsp;姓名</td>
                      <td  width="15%" class="home-list-title">&nbsp;舱位等级</td>
                      <td  width="15%" class="home-list-title">&nbsp;子舱位</td>
                      <td  width="15%" class="home-list-title">&nbsp;座位号</td>
                      <td  width="15%" class="home-list-title">&nbsp;行李件数</td>
                      <td  width="15%" class="home-list-title">&nbsp;行李重量</td>
                      <td  width="10%" class="home-list-title">&nbsp;查看</td>
                  </tr>
                    <c:forEach var="results" items="${passengerInfoList}" varStatus="status">
                    <tr>
                      <td class="home-list-content">&nbsp;<c:out value="${results.chineseName}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.cabinClass}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.subCabinClass}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.seat}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.luggageCount}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.luggageWeight}"/></td>
		      <td class="home-list-content" width="50">&nbsp;
		    	<img src="./images/view.gif" width="14" height="14" style="cursor:hand"  alt="<fmt:message key="button.view"/>"  onClick="MM_openBrWindow('./passengerInfo.html?method=view&id=<c:out value="${results.id}"/>','','width=700,height=500,scrollbars=yes')" >&nbsp;
		      </td>
                    </tr>
		</c:forEach> 
                  </table>
               
                </td>
              </tr>
            </table></td>
        </tr>
        </table>
		  </td>
        </tr>
        
        <tr> 
          <td height="12"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-bottom-left">&nbsp;</td>
                <td class="home-table-bottom-bg">&nbsp;</td>
                <td class="home-table-bottom-right">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="10">&nbsp;</td>
  </tr>
</table>
</html:form>
</body>
<script>
//written by kellen 07-04-19
function doDelete(chkName){  
		var selected = new Array(); 
		var val = "";	  
		   for (var i=0;i < document.forms[0].elements.length; i++){
				var e = document.forms[0].elements[i];  
				if (e.name==chkName){
					var chk = document.forms[0].elements[i];
					if(chk.checked){
						var bb = e.value; 
					    	selected.push(bb);
					    	break;
					} 
				}	 
			}	 
 		if(0!=selected.length){
 			if(confirm("<fmt:message key="common.confirm.message"/>")){  
				document.forms[0].method="post";
				document.forms[0].action="./passengerInfo.html?method=delete";
				document.forms[0].submit();
			}else return;	  			
		}else{
			alert("<fmt:message key="common.delete.message"/>");
		}	 
	}
 function savePassenger(){ 
	ajaxAnywhere.getZonesToReload = function() {
    return "passengerZone";
	}
	ajaxAnywhere.getAJAX('passengerInfo.html?flightInfoId=<c:out value="${param.flightInfoId}"/>','passengerZone')
     //ajaxAnywhere.submitAJAX(); 
}	
</script>
</html> 